Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
@cucumber/messages
Advanced tools
JSON schema-based messages for Cucumber's inter-process communication
The @cucumber/messages package is designed to provide a protocol for communication between different components of the Cucumber testing tool. It defines a set of message formats that can be used for representing test cases, test results, and other information in a standardized way. This facilitates interoperability between different parts of the Cucumber ecosystem, such as between the Cucumber framework itself and various plugins or integrations.
Serialization and Deserialization of Messages
This feature allows for the serialization and deserialization of Cucumber messages. It's useful for transmitting test results over a network or storing them in a file. The code sample demonstrates how to create an Envelope message, serialize it to a binary format, and then deserialize it back to a message object.
"use strict";
const { messages } = require('@cucumber/messages');
const { Envelope } = messages;
const envelope = Envelope.fromObject({ testStepFinished: { testStepResult: { status: 'PASSED' } } });
const serialized = Envelope.encode(envelope).finish();
const deserialized = Envelope.decode(serialized);
Creating and Working with Messages
This feature involves creating and manipulating various types of messages defined by the package, such as test cases, test steps, and results. The code sample shows how to create a TestCase message with specific properties.
"use strict";
const { messages } = require('@cucumber/messages');
const { TestCase } = messages;
const testCase = TestCase.create({ id: '1', pickleId: '2' });
console.log(testCase);
The 'gherkin' package is used for parsing Gherkin files, which are plain text files that describe features and scenarios for Cucumber tests. While 'gherkin' focuses on parsing the feature files, '@cucumber/messages' is more about defining a standard format for the messages that flow between different components of the Cucumber ecosystem. Both packages are part of the broader Cucumber framework but serve different roles.
The 'chai' package is a popular assertion library that can be used in conjunction with testing frameworks like Mocha or Cucumber. Unlike '@cucumber/messages', which is focused on the messaging protocol within the Cucumber ecosystem, 'chai' provides a rich set of assertions for writing test cases. It's more about enhancing the test writing experience rather than facilitating communication between Cucumber components.
[17.1.1] - 2021-09-17
null
values & guaranteed field order
(#1727 ehuelsmann)FAQs
JSON schema-based messages for Cucumber's inter-process communication
The npm package @cucumber/messages receives a total of 3,303,309 weekly downloads. As such, @cucumber/messages popularity was classified as popular.
We found that @cucumber/messages demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.